package com.uep.service.impl;

import com.uep.dao.UserInformationMapper;
import com.uep.entity.UserInformation;
import com.uep.service.UserInformationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * Created by XQ on 2017/2/9.
 */
@Service("UserInformation")
public class UserInformationServiceImpl implements UserInformationService{
    @Autowired
    UserInformationMapper userInformationMapper;

    @Override
    public void update(UserInformation record) {
        userInformationMapper.updateByPrimaryKey(record);
    }

    @Override
    public UserInformation findUserInformation(String userAccount) {
        return userInformationMapper.selectByPrimaryKey(userAccount);
    }

    @Override
    public UserInformation findPersonInformation(String userAccount) {

        return userInformationMapper.selectPersonInfo(userAccount);
    }

    @Override
    public void logIn(UserInformation record) {
        userInformationMapper.insert(record);
    }


}
